Potential fix for code scanning alert no. 5: Too few arguments to formatting function#35
Merged
amikhail48 merged 1 commit intomainfrom Mar 13, 2026
Merged
Potential fix for code scanning alert no. 5: Too few arguments to formatting function#35amikhail48 merged 1 commit intomainfrom
amikhail48 merged 1 commit intomainfrom
Conversation
…matting function Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential fix for https://github.com/RunEdgeAI/coreflow/security/code-scanning/5
To fix the problem, the number and types of arguments passed to
vxAddLogEntrymust match the format specifiers in its format string. The simplest and safest fix that preserves existing behavior is to add the missing arguments corresponding to the%ux%uplaceholders (destination width and height), similar to how the source-dimension log message just above should logically work.Concretely, in
framework/src/vx_graph.cppat theVX_TYPE_REMAPsection, locate theif (remap->dst_width != ...block and itsvxAddLogEntrycall:This format string has four specifiers:
%s,%u,%u,%u. We already pass arguments for the first two (nodes[n]->kernel->name,p), but not for the last two (%ux%u). The correct behavior is to log the actual destination width and height that were found to be invalid, which areremap->dst_widthandremap->dst_height. Therefore, we should extend the argument list to:No new includes or type definitions are needed;
remap,dst_width, anddst_heightare already in scope and properly typed in this context. This change aligns this log message with the pattern used in the nearby source-dimension log and fixes the formatting-function argument count error without altering control flow or semantics beyond improving the log contents.Suggested fixes powered by Copilot Autofix. Review carefully before merging.